package com.cdu.pojo.dto;

import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Min;

@Data
public class ProductAddDTO {
    @NotNull(message = "商品分类不能为空")
    private Integer categoryId;

    @NotBlank(message = "商品系列不能为空")
    private String itemType;

    @NotBlank(message = "商品标题不能为空")
    private String title;

    private String sellPoint;

    @NotNull(message = "商品价格不能为空")
    @Min(value = 0, message = "商品价格必须大于0")
    private Integer price;

    @NotNull(message = "商品库存不能为空")
    @Min(value = 0, message = "商品库存必须大于0")
    private Integer num;

    private String image;

    private Integer priority;
}